@using Radzen.Blazor

<li class="rz-legend-item" style="@Style" @onclick="@Click">
    <svg width="@((MarkerSize * 2).ToInvariantString())" height="@((MarkerSize * 2).ToInvariantString())">
        <g class="rz-series-@Index @Class">
            <Marker X="@MarkerSize" Y="@MarkerSize" Type="@(MarkerType == MarkerType.None ? MarkerType.Square : MarkerType)" Fill="@Color" Size="@MarkerSize" />
        </g>
    </svg>
    <span class="rz-legend-item-text">@Text</span>
</li>

@code {
    [Parameter]
    public string Color { get; set; }

    [Parameter]
    public string Text { get; set; }

    [Parameter]
    public string Class { get; set;}

    [Parameter]
    public string Style { get; set; }

    [Parameter]
    public MarkerType MarkerType { get; set; }

    [Parameter]
    public double MarkerSize { get; set; }

    [Parameter]
    public EventCallback Click { get; set; }

    [Parameter]
    public int Index { get; set; }
}
